import { navtext } from "@/utils/Api/NavText"
const title = ['居家', "美食", "服饰", "母婴", "个护", "严选", "数码", "运动", "杂huo"]
export default ({
  namespaced: true,
  state: {
    navigation: title.map(item=>{
      return {name:item}
    }),
    newidnex:null
  },
  getters: {
  },
  mutations: {
    addnav(state, obj) {
      state.navigation = obj
    },
    addnumebr(state,k){
      state.newidnex=k
    }
  },
  actions: {
    async getnav({ commit }) {
      let res = await navtext()
      commit('addnav', res.result)
    }
  },

})
